package org.ruanjj.multithread.JUC;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadPoolExecutor;

public class ThreadPool {
    public static void main(String[] args) {
      ExecutorService pool =  Executors.newCachedThreadPool();


      for(int i = 1; i<= 10; i++){
          pool.execute(()->{
              System.out.println(Thread.currentThread().getName()+"办理业务");
          });
      }

      pool.shutdown();
    }
}



